package com.yizhuoyan.his.service;

import com.yizhuoyan.his.ao.ChangePasswordAo;
import com.yizhuoyan.his.dto.SysAccountAuthorizationResult;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;

/**
 * 帐号鉴权相关服务
 */
public interface SysAccountAuthenticationService {
    /**
     * 登录
     * @param account 帐号
     * @param password 密码
     * @return 登录后授权结果
     * @throws Exception
     */
    public SysAccountAuthorizationResult login(@NonNull String account, @NonNull String password)throws Exception;

    /**
     * 注销
     * @param accountId 帐号id
     * @throws Exception
     */
    public void logout(@NonNull String accountId)throws Exception;

    /**
     * 修改密码
     * @param ao
     * @throws Exception
     */
    public void changePassword(ChangePasswordAo ao)throws Exception;
}
